using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class SkillSlotHolder : MonoBehaviour,IPointerClickHandler,IPointerEnterHandler,IPointerExitHandler
{
    public SkillUI skillUI;


    private void OnDisable()
    {
        InventoryManager.Instance.itemToolTip.gameObject.SetActive(false);
    }

    public void updateItem()
    {
        skillUI.SkillList = InventoryManager.Instance.SkillData;
        
        var skill = skillUI.SkillList.items[skillUI.Index];
        skillUI.SetupSillUI(skill);
    }
    
    

    public void OnPointerEnter(PointerEventData eventData)
    {
        if (skillUI.getSkillSo())
        {
            InventoryManager.Instance.itemToolTip.SetUpTooltip(skillUI.getSkillSo());
            InventoryManager.Instance.itemToolTip.gameObject.SetActive(true);
        }
    }

    public void OnPointerExit(PointerEventData eventData)
    {
        InventoryManager.Instance.itemToolTip.gameObject.SetActive(false);
    }

    public void OnPointerClick(PointerEventData eventData)
    {
        throw new System.NotImplementedException();
    }
}
